package com.distributer.order.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.distributer.order.db.TargetDataSource;
import com.distributer.order.mapper.OrderItemMapper;
import com.distributer.order.model.OrderItem;
import com.distributer.order.service.OrderItemService;

@Service
@Transactional
public class OrderItemServiceImpl implements OrderItemService{

	@Autowired
	private OrderItemMapper orderItemMapper;

	@TargetDataSource("order_item")
	@Override
	public void addOrderItem(OrderItem orderItem) {
		orderItemMapper.insert(orderItem);
	}

	@Override
	public void updateOrderItem(OrderItem orderItem) {
		orderItemMapper.update(orderItem);
	}
	
	@Override
	public OrderItem findOrderItemByOrderItemNo(String orderItemNo) {
		return null;
	}
}
